/**
 * @param {number} n
 * @return {number}
 */
var climbStairs = function (n) {
    let one = 1
    let two = 2
    let num = 0
    if (n < 3) return n;
    let count = 3;
    while (count <= n) {
        num = one + two;
        [one, two] = [two, num]
        count++
    }

    return num
};